<!DOCTYPE html>
<!--
该页面是将最右边的重复性代码分离出来

方便管理

-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!-- 左侧边栏， -->
<aside th:fragment="left"class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <!-- 左侧用户面板 (optional) -->
        <div class="user-panel">
            <div class="pull-left image">
                <img th:src="${session.user}?${session.user.headImage}:'/AdminLTE/dist/img/user2-160x160.jpg'" class="img-circle" alt="头像">
            </div>
            <div class="pull-left info">
                <p th:text="${session.user}?${session.user.nickname}:'昵称'">用户名</p>
                <!-- Status -->
                <a href="#"><i class="fa fa-circle text-success"></i><span th:text="${session.user}?'在线':'离线'"></span></a>
            </div>
        </div>

        <!-- 搜索 form (Optional) -->
        <form action="/search" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="tableName" class="form-control sql-injection-filter" placeholder="搜索收集表..." required>
                <span class="input-group-btn">
              <button type="submit" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
              </button>
            </span>
            </div>
        </form>
        <!-- /.search form -->

        <!-- 左侧边栏 菜单 -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="header">菜单</li>
            <!-- Optionally, you can add icons to the links -->

            <li><a href="/index"><i class="glyphicon glyphicon-flag"></i> <span>我的收藏</span></a></li>

            <li class="treeview">
                <a href="#"><i class="fa fa-table"></i> <span>信息收集</span>
                    <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="/collect/new">发起收集</a></li>
                    <li><a href="/collect/my">我发起的</a></li>
                    <li><a href="/collect/filled">我参与的</a></li>
                </ul>
            </li>

            <li class="treeview">
                <a href="#"><i class="fa fa-envelope"></i> <span>消息</span>
                  <span class="pull-right-container">
                    <i class="fa fa-angle-left pull-right"></i>
                    <small class="label pull-right bg-red" th:if="${session.newMessagesFlag}">new</small>
                  </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="/message/2"><i class="fa fa-commenting-o"></i> <span>评论提醒</span></a></li>
                    <li><a href="/message/3"><i class="fa fa-commenting-o"></i> <span>回复提醒</span></a></li>
                    <li><a href="/message/1"><i class="fa fa-bullhorn"></i> <span>系统通知</span></a></li>
                </ul>
            </li>

            <li class="treeview">
                <a href="#"><i class="fa fa-user"></i> <span>个人中心</span>
                    <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="/user/profile">编辑资料</a></li>
                    <li><a href="/user/changepasswd">修改密码</a></li>
                </ul>
            </li>


            <!--<li><a href="/group"><i class="fa fa-group"></i> <span>我的组</span></a></li>-->

            <li><a href="/settings"><i class="fa fa-gear"></i> <span>设置</span></a></li>

        </ul>
        <!-- /.sidebar-menu -->
    </section>
    <!-- /.sidebar -->
</aside>
</body>
</html>